package com.jsbs.iam.user.mapper;

import com.jsbs.iam.user.vo.AdminUserRoleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface IamAdminRoleUserInfoMapper {

    /**
     * 功能描述：根据角色编码获取ID
     * @param adminRoleCode
     * @return
     */
    Long queryByRoleCode(@Param("adminRoleCode") String adminRoleCode);

    /**
     * 功能描述：批量删除
     * @param userName
     * @param ids
     */
    void deleteByRoleId(@Param("ids") List<Long> ids, @Param("userName") String userName);

    /**
     * 功能描述：根据用户信息获取管理员角色
     * @param account
     * @return
     */
    List<AdminUserRoleVo> getAdminRoleByUser(@Param("account") String account);
}
